﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace Datas
{
    [Serializable]
    public class Data
    {
        [SerializeField] private int baseValue;

        private List<int> modifys = new List<int>();


        public int GetValue()
        {
            int finalValue = baseValue;
            foreach (int v in modifys) 
            {
                finalValue += v;
            }
            return finalValue;
        }

        public int GetModify()
        {
            int finalValue = 0;
            foreach (int v in modifys)
            {
                finalValue += v;
            }
            return finalValue;
        }


        public void SetDeafult(int _value)
        {
            baseValue = _value;
        }

        public void AddModify(int _value)
        {
            modifys.Add( _value);
        }

        public void RemoveModify(int _value)
        {
            modifys.Remove( _value);
        }

    }
}
